#ifndef TEXTURE_H
#define TEXTURE_H

#include "Pixel.h"

class Texture
{
public:
	//Constructors
	Texture(unsigned int newheight, unsigned int newwidth);
	Texture(const Texture& rhs);

	//Destructor
    virtual ~Texture();

	//Get the heigh and width of this texture
	unsigned int GetHeight() const;
	unsigned int GetWidth() const;

	//Get a pixel from the texture
	const Pixel& GetPixel(unsigned int x, unsigned int y) const;

	//Set the texture to 1 color
	void SetColor(const Pixel& color);

	//Operator easily access a certain pixel
	const Pixel& operator()(unsigned int x, unsigned int y) const;

protected:
	//Function to allocate the pixeldata array
	void Allocate();

private:
	//Height and width (in pixels) of this texture
	unsigned int height;
	unsigned int width;

	//The array of pixels that represents the texture
	Pixel* pixeldata;
};

#endif // TEXTURE_H
